class Food {
    element: HTMLElement

    constructor() {
        this.element = document.getElementById('food')!;
    }
    get X() {
        return this.element.offsetLeft;
    }

    get Y() {
        return this.element.offsetTop;
    }

    change() {
        let X = Math.round(Math.random() * 29) * 10
        let Y = Math.round(Math.random() * 29) * 10
        this.element.style.top = X + 'px'
        this.element.style.left = Y + 'px'
    }
}

export default Food
